package com.example.it.looker.view;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

/**
 * Created by 鲁迅认识的那只猹 on 8/31/2017 7:22 PM.
 * Emial 1258730808@qq.com
 * Desc:
 */

public abstract class BaseFragment extends Fragment {

    public abstract View bindingView(LayoutInflater inflater, Bundle savedInstanceState);

    public abstract void initFindView(View view);

    public abstract void init();

    public abstract void registerEvent();

    @Override
    public abstract void onDestroyView();

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = bindingView(inflater, savedInstanceState);
        initFindView(view);
        init();
        registerEvent();
        return view;
    }
}
